<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title>绑定支付宝</title>
		<link rel="stylesheet" href="../layui/css/layui.css">
		<link rel="stylesheet" type="text/css" href="../css/bdzfb.css" />
	</head>
	<style type="text/css">
		.p-content input{
			width: 100%;
			height: 100%;
			border: none;
		}
	</style>
	<body>
		<header>
			<a href="javascript:history.back(-1)" class="back"><img src="../img/back.png" height="18px"></a>
			<div class="center title">绑定支付宝</div>
		</header>
			<div >
				<ul>
					<li>
						<div>
					<div class="p-title"><p>支付宝</p> </div>
						<div  class="p-content"><input type="text" value="" placeholder="输入支付宝账号" name="z_count"></div>
						</div>
					</li>
					<li>
						<div>
					<div>	<p class="p-title">账户姓名</p> </div>
						<div  class="p-content"><input type="text" placeholder="输入姓名" name="zName"></div>
						</div>
					</li>
				</ul>
		</div>
			<button class="nextstep">下一步</button>
	</body>
</html>
<script src="../js/jquery-3.3.1.js"></script>
<script src="../layui/layui.all.js"></script>
<script src="../layui/layui.js"></script>
<script type="text/javascript">
	
	$('.nextstep').click(function() {
		var z_name = $('input[name="z_name"]').val();
		var z_count = $('input[name="z_count"]').val();

		$.get('/meiyou/bindAlipay',{
			z_count:z_count,
			z_name:z_name
		},function(data){
			console.log(data);
			if(data.code==0){
				//绑定失败
				layer.msg(data.msg,{icon:5,time:800},function(){
					window.location.reload();
				})
			}else{
				//绑定成功
				layer.msg(data.msg,{icon:6,time:800},function(){
					window.location.reload();
				})
			}
		})
	})
</script>